<template>
    <loading v-if="destory"></loading>
</template>

<script>
import Loading from "@/components/loading/component/loading.vue"
export default {
    data() {
        return {
            destory: true,
            timer: null,
        }
    },
    components: {
        Loading
    },
    mounted() {
        let vm = this;
        this.timer = setTimeout(vm.destoried, 2000);
        
    },
    beforeDestroy() {
        clearTimeout(this.timer);
    },
    methods: {
        destoried() {
            this.destory = false;
            this.$router.push({
                name: 'register'
            })
        },
    }
}
</script>
